package br.inf.solutions.apresentacoes.ssp.model;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import br.com.vexillum.model.CommonEntityActivated;
import br.com.vexillum.model.annotations.Validate;

@SuppressWarnings("serial")
@Entity
public class Requeriment extends CommonEntityActivated {
 
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="square_id",nullable=false)
	private Square square;
	
	@ManyToOne(fetch= FetchType.LAZY)
	private PostGraduation postGraduation;
	
	@Validate(notNull=true)
	@Column(nullable=false)
	private Long interstice;	
	
	@Validate(notNull=true)
	@Column(nullable=false)
	private Long limiteAge;	
	
	@Validate(notNull=true)
	@Column(nullable=false)
	private Long amountExpected;	
	
	@Validate(notNull=true)
	private String literacy;
	
	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(nullable=true)
	private List<Course> Courses;

	public Square getSquare() {
		return square;
	}

	public void setSquare(Square square) {
		this.square = square;
	}

	public Long getInterstice() {
		return interstice;
	}

	public void setInterstice(Long interstice) {
		this.interstice = interstice;
	}

	public Long getLimiteAge() {
		return limiteAge;
	}

	public void setLimiteAge(Long limiteAge) {
		this.limiteAge = limiteAge;
	}

	public Long getAmountExpected() {
		return amountExpected;
	}

	public void setAmountExpected(Long amountExpected) {
		this.amountExpected = amountExpected;
	}

	public String getLiteracy() {
		return literacy;
	}

	public void setLiteracy(String literacy) {
		this.literacy = literacy;
	}

	public List<Course> getCourses() {
		return Courses;
	}

	public void setCourses(List<Course> courses) {
		Courses = courses;
	}

	public PostGraduation getPostGraduation() {
		return postGraduation;
	}

	public void setPostGraduation(PostGraduation postGraduation) {
		this.postGraduation = postGraduation;
	}
	 
}
 
